from django.conf.urls import url, include
from news import views


#自定义url路径
urlpatterns = [
    url(r'index/', views.NewsIndex.as_view(), name='NewsIndex'),
    url(r'login/', views.NewsLogin.as_view(), name='NewsLogin'),
    url(r'contact/', views.NewsContact.as_view(), name='NewsContact'),
    url(r'category/(?P<name>.*)/', views.NewsCategoryList.as_view(), name='NewsCategoryList'),
    url(r'category', views.NewsCategory.as_view(), name='NewsCategory'),
    url(r'search/result', views.NewsSearchView.as_view(), name='NewsSearchView'),
    url(r'search/', views.NewsSearch.as_view(), name='NewsSearch'),
    url(r'events/', views.NewsEvents.as_view(), name='NewsEvents'),
    url(r'register/', views.NewsRegister.as_view(), name='NewsRegister'),
    # url(r'single/', views.NewsSingleView.as_view(), name='NewsSingleView'),
    url(r'logout/', views.user_logout, name='user_logout'),
    url(r'detail/(?P<pk>\d+)/', views.NewsDetailView.as_view(), name='news_detail'),
    url(r'single/comment/', views.NewsCommentsView.as_view(), name='NewsCommentsView'),
    # url(r'ckeditor/', include('news.urls')),
]